package edu.nf.exam.dao;

import edu.nf.exam.entity.PaperQuestionInfo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @Author : QYM
 * @create 2021/6/17
 * 试题信息表--接口
 */
public interface PaperQuestionInfoDao {

    /**
     * 多条件查询
     * @param paperQuestionInfo
     * @return
     */
    List<PaperQuestionInfo> select(PaperQuestionInfo paperQuestionInfo);

    /**
     * 根据ID查询
     * @param paperQuestionId
     * @return
     */
    PaperQuestionInfo selectById(Integer paperQuestionId);

    /**
     * 添加
     * @param paperQuestionInfo
     * @return
     */
    int add(PaperQuestionInfo paperQuestionInfo);

    /**
     * 修改
     * @param paperQuestionInfo
     * @return
     */
    int update(PaperQuestionInfo paperQuestionInfo);

    /**
     * 分页查询
     * @param paperQuestionId
     * @param difficult
     * @param questionType
     * @param levelName
     * @param subjectName
     * @param pageNum
     * @param pageSize
     * @return
     */
    List<PaperQuestionInfo> selectByPage(@Param("paperQuestionId")Integer paperQuestionId,
                                         @Param("difficult")Integer difficult,
                                         @Param("questionType")Integer questionType,
                                         @Param("levelName")String levelName,
                                         @Param("subjectName")String subjectName,
                                         @Param("pageNum")Integer pageNum,
                                         @Param("pageSize")Integer pageSize);

    /**
     * 查询题目月数量
     * @param createTime
     * @return
     */
    List<PaperQuestionInfo> selectMonthCount(String createTime);

}
